package cn.tedu.medicalappointmentsystemk.pojo.vo;

import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.io.Serializable;
import java.time.ZoneId;
import java.util.Date;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class ScheduleSelectVO implements Serializable {
    Long id;
    Integer day;
    Date createDate;
    String dutyShift;
    public ScheduleSelectVO(Long id,Date createDate,String dutyShift){
        this.id = id;
        this.createDate = createDate;
        this.dutyShift = dutyShift;
        this.day = createDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getDayOfWeek().getValue();
    }
}
